/**
 * Created by Administrator on 2016/2/5.
 */
var net = require('net');
var socket = net.connect({port:12345,host:'localhost'},function(){
    console.log('connection successful!');
});

socket.on('data',function(data){
    console.log(data.toString());
});